Conversation
Load an asap-stage-pipeline/v1 document (file picker or ?doc=<path>) and show Logical, Logical ASAP and Physical ASAP lanes side by side, with candidate switchers, per-node timing and cost, a cost-ranked list of physical candidates, and the stage-3 selection and rejection reasons. Selecting a physical candidate shows its from_logical candidate in lane 2. Pre/Post-ASAP stays the default unless a stage document is loaded. stages.js holds the DOM-free validation, lane construction and ranking, tested headless against a hand-written #509 Example 1 Q2 fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contract v2 (Q28-Q30) gives each DAG one root per workload query and moves cost out of Stage 2 into stage3_selection.costs. - Read `roots` (still accepting a single `root`); mark every root and label it with its query id. - Take node badges, totals and ranking only from Stage 3 costs, labelled as a Stage 3 result; without Stage 3 the physical lane has no cost. - Load partial documents; missing later stages render "not produced". - Require every Stage 2 candidate to be selected or rejected, and show valid-but-costlier apart from invalid. - Show optional per-query requirements in the query list and on roots. - Rewrite the sample as #509 Example 1 with both queries, and label sort/limit physical operators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
stack/509-viewer-stages
branch
from
October 4, 2026 15:23
ce8844d to
f76cc22
Compare
zzylol
changed the base branch from
stack/528-08-cleanup
to
stack/572-b5-executor
October 4, 2026 15:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#509 defines four planning stages:
The DAG viewer only had a two-lane Pre/Post-ASAP view, so it could not show the candidate sets at each stage or why Stage 3 picked one plan.
What
A Stages view in
tools/dag-viewerforasap-stage-pipeline/v1documents:output_state.timing. The details panel shows payload, schema, guarantee, coverage and query requirements, and physical edges also showdata_state.The logic that needs no page lives in
stages.js, so it can be tested headless: validation (17 malformed-document cases), ranking, lanes and outcomes.Before / After
python3 tools/dag-viewer/server.py --port 8765, then open/?doc=<stage document>.?doc=examples/stage-pipeline.sample.json.stage_pipelinedevtool in the Stage 2/3 PR): two PromQL queries, Stage 1 → 24 → 24 → Stage 3 selects P20 (all exact), 8 CMS+heap plans rejected as invalid, 15 others valid but costlier.Validation
python3 -m unittest discover -s tools/dag-viewer -p test_render.py: 40 tests pass (16 JS tests are skipped withoutpy_mini_racer). The real Example 1 document passes the viewer's validator with no errors, and the server serves the page,stages.jsand the document.Based on #587, the tip of the Phase A–C stack (#528). The format is in
/tools/dag-viewer/README.md, section "Stages view".🤖 Generated with Claude Code